<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <button onclick="add()">按钮</button>
    <script src="../node_modules/@vue/reactivity/dist/reactivity.global.js"></script>
    <script>
      let { effect, reactive } = VueReactivity;
      let state = reactive({ name: "张三", age: 18, arr: [1, 2, 3] });

      effect(() => {
        app.innerHTML = `${state.age}`;
      });

      function add(){
        state.age++
      }
    </script>
  </body>
</html>
